package be.ipl.finito.daoimpl;

import java.util.List;

import javax.ejb.Stateless;

import be.ipl.finito.dao.CaseDao;
import be.ipl.finito.domaine.Case;
import be.ipl.finito.domaine.Plateau;

@SuppressWarnings("serial")
@Stateless
public class CaseDaoImpl extends DaoImpl<Integer, Case> implements CaseDao {

	public List<Case> rechercherCasesOccupees(Plateau plateau) {
		String queryString = "SELECT c FROM Case c, IN(c.plateau) pl WHERE pl.id_plateau = ?1";
		return liste(queryString, plateau.getIdPlateau());
	}

}
